In a numerically controlled apparatus, such as for performing motor control of a movable shaft in a machine tool, an absolute rotary encoder is used as a sensor apparatus for movable positional detection of a feed shaft, and for rotor pole positional detection and speed detection of a motor. In recent absolute rotary encoders, serial communications are primarily used as an output method for the detected data to reduce the amount of wiring.
FIG. 4 shows a block diagram of a system including a conventional sensor apparatus and numerically controlled apparatus.
A host monitor apparatus 10 calculates and generates positional command data for a control shaft from an internal host control computer 12. The host control computer 12 feeds the calculated positional command data PO to a transmitting circuit 11 at fixed time intervals. The transmitting circuit 11 converts the positional command data PO into a serial signal HTX and transmits it to a servo control apparatus 3. The servo control apparatus 3 controls a motor current UVW so that the rotary shaft of a motor 2 is rotated according to the positional command data PO.
The servo control apparatus 3 transmits to an absolute rotary encoder 1, which is a sensor for detecting the position of the rotary shaft of the motor 2, a positional data request command as a serial signal STX at an interval shorter than the transmission cycle of the positional command data. FIG. 5 shows the structure of the transmission frame for the positional data request command. In the figure, SF is a communication control code indicating the start of the communication frame, DA is data indicating the communication address of the other party, or the rotary encoder 1, CM is a command code indicating the frame is a positional data request command, CRC is an error check code from data DA to CM and is data for detecting errors in the transmit data, and EF is a communication control code indicating the end of the communication frame.
The rotary encoder 1 includes a high precision sensor 4 for detecting the rotational position of the motor 2 at a high precision and high resolution, a single rotation sensor 5 for detecting the absolute position within one rotation, and a multiple rotation sensor 6 for detecting multiple rotations. Using a sensor control computer 7, the rotary encoder 1 combines and converts the positional information from the three sensors into a 40-bit positional detected data PS representing single rotation information in 24 bits and multiple rotation information in 16 bits. Furthermore, the sensor control computer 7 checks that there is no conflict in the positional information from the three sensors, and converts the result into an 8-bit status data STS. When the rotary encoder 1 receives the communication frame for the positional data request command at a receiving circuit 8 from the servo control apparatus 3, the sensor control computer 7 combines the 40-bit positional data and the 8-bit status data and further the destination address data DA indicating the servo control apparatus 3 and the address data SA indicating the source, and then feeds these data as the positional detected information to a transmitting circuit 9. The transmitting circuit 9 transmits the input positional detected information as a serial signal SRX to the servo control apparatus 3. FIG. 6 shows the transmission frame structure for the positional detected information.
When the servo control apparatus 3 receives the frame for the positional detected information from the rotary encoder 1, the data is converted to rotor pole positional data and speed data of the motor 2, and the control of the motor current UVW, the speed control, and the positional control are performed. Furthermore, the servo control apparatus 3 converts the positional detected data PS from the rotary encoder 1 into a serial signal HRX and transmits it to a host monitor apparatus 10. A host control computer 12 monitors for system errors by comparing the positional command data PO and the positional detected data PS that is received from a receiving circuit 15.
Numerically controlled apparatuses, such as the one shown in FIG. 4, uses a sensor apparatus having high reliability by including a plurality of sensors as in the absolute rotary encoder 1 and mutually checking the individual sensor information. Furthermore, by adding an error checking code to the transmit data in the serial communications, a communication quality having high reliability is maintained to ensure sufficient reliability during actual operation. However, in the event an error occurs in a component part of the servo control apparatus 3, a difference may exist between the positional data transmitted by the rotary encoder 1 and the positional detected data transmitted by the servo control apparatus 3 to the host monitor apparatus 10. At this time, the servo control apparatus 3 cannot detect the error, and further it is also possible the system error cannot be detected at the host monitor apparatus 10 by comparing the positional data and the positional command data. Generally, if the erroneous but updated sensor data is output to the host monitor apparatus due to a malfunction of the servo control apparatus, the difference between the sensor data and the command data often makes it possible to detect errors at the host monitor apparatus. However, if the erroneous but non-updated data is output to the host monitor apparatus due to a malfunction of the servo control apparatus, the error is not detected. For example, in case of that the motor is rotating but the sensor information is not updated with that state, if the host monitor apparatus is outputting the stop command, the host monitor apparatus determines as normal state because the motor seems as stopped. Thus, if further reliability of the system is desirable, a receiving circuit 14 capable of receiving positional detected data from the rotary encoder 1 in a path different from the servo control apparatus 3 is added to the host monitor apparatus 10 as shown in FIG. 4. The host monitor apparatus 10 compares the positional detected data that is received by the receiving circuit 14 and the positional command data or the current positional data from the servo control apparatus 3 to make it possible to more reliably detect an error in the positional detected data.
To further improve the reliability in numerically controlled apparatuses using a conventional sensor apparatus, it is necessary to receive the transmit data from the sensor apparatus along a communication path different from the servo control apparatus. Thus, the amount of wiring increases and an additional receiving circuit becomes necessary. This therefore results in problems where the overall cost of the system increases and the failure rate of the system increases by the increased amount of the hardware components, such as the receiving circuit and wiring.
The present invention solves the aforementioned problems and is intended to reduce the cost and provide a sensor apparatus and a system monitoring method for configuring a system of high reliability.